{% load url_helper %}<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>{% block title %}{% endblock %} - Newstopia</title>
	<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" type="text/css" />
	<script src="{{ STATIC_URL }}js/jquery-1.7.1.js" type="text/javascript"></script>
	<script src="{{ STATIC_URL }}js/ui.js" type="text/javascript"></script>
  {% block scripts %}{% endblock %}
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />		
</head>
<body class="{{ module_name|lower }}">
<div id="outer-wrapper">
	<div id="outer-header">
	  <div id="header">
		  <div id="logo">
			<a href="{% url home %}">
			  <img src="{{ STATIC_URL }}img/logo.png" alt="Newstopia" />
			</a>
		  </div>
	    
	      
	    


	    <div id="nav">
		    <h2>Website navigation</h2>

		      
		 {% if user.is_authenticated %}
		     <ul> 
			    <li><a href="{% url contact %}">Contact us</a></li>
			    <li><a href="{% url users %}">Settings</a></li>
			    <li><a href="{% url logout %}">Logout</a></li>
		     </ul>
		 {% else %}

		    <ul>
			    <li><a href="{% url contact %}">Contact us</a></li>
			    <li><a id="login" href="{% url login %}">Login</a></li>
			    <li><a href="{% url register %}">Register</a></li>
		    </ul>
		

		    <form method="post" action="/accounts/login/?next={{ next|default:"/" }}">{% csrf_token %}
		      <div id="quickLogin">
    		      <h2>Login</h2>
			    <div class="quick">
				  <label for="username">Username</label>
				  <input type="text" id="quickusername" name="username" />
			    </div>
			    <div class="quick">
				  <label for="password">Password</label>
				  <input type="Password" id="quickpassword" name="password" />
			    </div>
			    <div class ="quick" id="quickbutton">
				  <input type="submit" value="Go"/>
			    </div>
			    <div class = "quick" id="pwforgot">
				  <a id="pwforgotten" href="{%url forgotten%}">Password forgotten</a>
			    </div>
		    </div>
		</form>
	    {% endif %}

		
	    </div>
		
		<div id="searcharea">
		  <h2>Search for news</h2>
		  <form action="{% categorySearchURL %}" method="get">
			  <p>
				  <label for="keyword" title="Keyword to use for search">Search</label>
				  <input id="keyword" name="keyword" type="text" value="{% block query %}{% endblock %}" />
			  </p>
			  <div id="suggestions">
				  
			  </div>
			  <p>
				  <input type="submit" value="Search" />
			  </p>
		  </form>
		</div>
	  </div>
	</div>


	  <div id="wrapper">

		  <div id="categories">
			  <h2>Categories to filter news on</h2>
			  <ul>

				  <li id="category_home"><a href="{% url_category 'newsByCategory' '' %}">All news</a></li>
          {% for item in temp_favorites %}
				  <li {% is_active_category item.search %}><a href="{% url_category 'newsByCategory' item.search %}">{{ item.search }}</a></li>
          {% endfor %}
			  </ul>
		  </div>

		  <div id="content">
        {% block content %}{% endblock %}
      </div>

</div>
  
 
  </div>
  <div id="footer">
	  <p>
		  &copy;Team Leksvik,2012
	  </p>
  </div>
</body>
</html>
